<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'allLinks.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
	<script type="text/javascript" src="<%=path %>/Plugins/Jquery/jquery-ui-1.8.22.custom/development-bundle/jquery-1.7.2.js"></script>
	<script type="text/javascript" src="<%=path %>/link/jquery.corner.js"></script>
	<script type="text/javascript">
	$(document).ready(function() {
		addList();
	 	$(".myCorner").corner("round 10px").parent().css("bgcolor","gray").css("padding","10px").corner("round 10px");
	 	$("a").first().click(function(){
	 		return false;
	 	});
	});
	
	function setAnimal(i){
		$("div[id=linkLi]").eq(i).animate({width:170},"slow");	
		$("div[id=linkLi]").eq(i).animate({width:210},"slow");
		return false;
	}
	
	function deleteAnimal(i){
		$("div[id=linkLi]").eq(i).css("width","210px");	
		return false;
	}
	
	function addList(){
		var linkHref = new Array(['http://www.moe.edu.cn/','&nbsp;&nbsp;&nbsp;中国教育部&nbsp;&nbsp;&nbsp;'],
								 ['http://www.cma.gov.cn/','&nbsp;&nbsp;&nbsp;中国气象局&nbsp;&nbsp;&nbsp;'],
								 ['http://www.stats.gov.cn/','&nbsp;&nbsp;&nbsp;中国统计局&nbsp;&nbsp;&nbsp;'],
								 ['http://www.sc.gov.cn/','&nbsp;四川省人民政府&nbsp;'],
								 ['http://www.scedu.net/','&nbsp;&nbsp;四川省教育厅 &nbsp;&nbsp;'], 
								 ['http://www.cuit.edu.cn','成都信息工程学院'],
								 ['http://software.cuit.edu.cn:10000','&nbsp;&nbsp;软件工程学院&nbsp;&nbsp;']);     
		for(var i = 0 ; i < linkHref.length; ++ i){
			$("#linkUl").append("<div id='linkLi' onmouseover='setAnimal(" + i + ")' onmouseout='deleteAnimal(" + i + ")'><a class='myCorner' target='blank' href='" + linkHref[i][0] +"'>" + linkHref[i][1] +"</a></div>");
			$("div[id=linkLi]").addClass("linkDiv");
		}
	}
	
	</script>
	
	<style type="text/css">
		 .myCorner{
		 	background-color: silver;
		 	width: 100%;
		 }
		 .parent{
		 	width: 210px;
		 	float: left;
		 }
		 a {
			text-decoration: none;
			color: blue;
			font-size: 18px;
			target:blank;
		}
		.linkDiv{
			background-color: gray;
			margin-top: 3px;
			text-align: center;
		}
	</style>
	
  </head>
<body>
	 <div class="parent" id="linkUl">
	 	
	 </div>
</body>
</html>
 